Optimal. Leaf size=334 \[ \frac {B^2 (b c-a d)^2 i^2 x}{3 b^2}+\frac {B^2 (b c-a d)^3 i^2 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}-\frac {2 B (b c-a d)^2 i^2 (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3}-\frac {B (b c-a d) i^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {B^2 (b c-a d)^3 i^2 \log (c+d x)}{b^3 d}+\frac {2 B (b c-a d)^3 i^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}-\frac {2 B^2 (b c-a d)^3 i^2 \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 334, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2552, 2356,
2389, 2379, 2438, 2351, 31, 46} \begin {gather*} -\frac {2 B^2 i^2 (b c-a d)^3 \text {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{3 b^3 d}+\frac {2 B i^2 (b c-a d)^3 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b^3 d}-\frac {2 B i^2 (a+b x) (b c-a d)^2 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b^3}-\frac {B i^2 (c+d x)^2 (b c-a d) \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{3 b d}+\frac {i^2 (c+d x)^3 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )^2}{3 d}+\frac {B^2 i^2 (b c-a d)^3 \log \left (\frac {a+b x}{c+d x}\right )}{3 b^3 d}+\frac {B^2 i^2 (b c-a d)^3 \log (c+d x)}{b^3 d}+\frac {B^2 i^2 x (b c-a d)^2}{3 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 46
Rule 2351
Rule 2356
Rule 2379
Rule 2389
Rule 2438
Rule 2552
Rubi steps
\begin {align*} \int (67 c+67 d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2 \, dx &=\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {(2 B) \int \frac {300763 (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{a+b x} \, dx}{201 d}\\ &=\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {(8978 B (b c-a d)) \int \frac {(c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{a+b x} \, dx}{3 d}\\ &=\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {(8978 B (b c-a d)) \int \left (\frac {d (b c-a d) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{b^2}+\frac {(b c-a d)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{b^2 (a+b x)}+\frac {d (c+d x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{b}\right ) \, dx}{3 d}\\ &=\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}-\frac {(8978 B (b c-a d)) \int (c+d x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx}{3 b}-\frac {\left (8978 B (b c-a d)^2\right ) \int \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx}{3 b^2}-\frac {\left (8978 B (b c-a d)^3\right ) \int \frac {A+B \log \left (\frac {e (a+b x)}{c+d x}\right )}{a+b x} \, dx}{3 b^2 d}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {\left (4489 B^2 (b c-a d)\right ) \int \frac {(b c-a d) (c+d x)}{a+b x} \, dx}{3 b d}-\frac {\left (8978 B^2 (b c-a d)^2\right ) \int \log \left (\frac {e (a+b x)}{c+d x}\right ) \, dx}{3 b^2}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {(c+d x) \left (-\frac {d e (a+b x)}{(c+d x)^2}+\frac {b e}{c+d x}\right ) \log (a+b x)}{e (a+b x)} \, dx}{3 b^3 d}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {\left (4489 B^2 (b c-a d)^2\right ) \int \frac {c+d x}{a+b x} \, dx}{3 b d}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {1}{c+d x} \, dx}{3 b^3}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {(c+d x) \left (-\frac {d e (a+b x)}{(c+d x)^2}+\frac {b e}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{3 b^3 d e}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {8978 B^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}+\frac {\left (4489 B^2 (b c-a d)^2\right ) \int \left (\frac {d}{b}+\frac {b c-a d}{b (a+b x)}\right ) \, dx}{3 b d}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \left (\frac {b e \log (a+b x)}{a+b x}-\frac {d e \log (a+b x)}{c+d x}\right ) \, dx}{3 b^3 d e}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^3 \log (a+b x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {8978 B^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}-\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{3 b^3}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{3 b^2 d}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^3 \log (a+b x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {8978 B^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^3 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 b^3 d}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{3 b^3 d}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{3 b^2 d}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^3 \log (a+b x)}{3 b^3 d}+\frac {4489 B^2 (b c-a d)^3 \log ^2(a+b x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {8978 B^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^3 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 b^3 d}+\frac {\left (8978 B^2 (b c-a d)^3\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{3 b^3 d}\\ &=-\frac {8978 A B (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^2 x}{3 b^2}+\frac {4489 B^2 (b c-a d)^3 \log (a+b x)}{3 b^3 d}+\frac {4489 B^2 (b c-a d)^3 \log ^2(a+b x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^2 (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )}{3 b^3}-\frac {4489 B (b c-a d) (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b d}-\frac {8978 B (b c-a d)^3 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{3 b^3 d}+\frac {4489 (c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2}{3 d}+\frac {8978 B^2 (b c-a d)^3 \log (c+d x)}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^3 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{3 b^3 d}-\frac {8978 B^2 (b c-a d)^3 \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{3 b^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 287, normalized size = 0.86 \begin {gather*} \frac {i^2 \left ((c+d x)^3 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )^2-\frac {B (b c-a d) \left (2 A b d (b c-a d) x-B (b c-a d) (b d x+(b c-a d) \log (a+b x))+2 B d (b c-a d) (a+b x) \log \left (\frac {e (a+b x)}{c+d x}\right )+b^2 (c+d x)^2 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )+2 (b c-a d)^2 \log (a+b x) \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )-2 B (b c-a d)^2 \log (c+d x)-B (b c-a d)^2 \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )\right )}{b^3}\right )}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.23, size = 0, normalized size = 0.00 \[\int \left (d i x +c i \right )^{2} \left (A +B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )\right )^{2}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 914 vs.
\(2 (300) = 600\).
time = 0.36, size = 914, normalized size = 2.74 \begin {gather*} -\frac {1}{3} \, A^{2} d^{2} x^{3} - A^{2} c d x^{2} - 2 \, {\left (x \log \left (\frac {b x e}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} A B c^{2} - 2 \, {\left (x^{2} \log \left (\frac {b x e}{d x + c} + \frac {a e}{d x + c}\right ) - \frac {a^{2} \log \left (b x + a\right )}{b^{2}} + \frac {c^{2} \log \left (d x + c\right )}{d^{2}} - \frac {{\left (b c - a d\right )} x}{b d}\right )} A B c d - \frac {1}{3} \, {\left (2 \, x^{3} \log \left (\frac {b x e}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} A B d^{2} - A^{2} c^{2} x - \frac {{\left (b^{2} c^{3} - 5 \, a b c^{2} d + 2 \, a^{2} c d^{2}\right )} B^{2} \log \left (d x + c\right )}{3 \, b^{2} d} + \frac {2 \, {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B^{2}}{3 \, b^{3} d} - \frac {B^{2} b^{3} d^{3} x^{3} + {\left (2 \, b^{3} c d^{2} + a b^{2} d^{3}\right )} B^{2} x^{2} + {\left (4 \, a b^{2} c d^{2} - a^{2} b d^{3}\right )} B^{2} x + {\left (B^{2} b^{3} d^{3} x^{3} + 3 \, B^{2} b^{3} c d^{2} x^{2} + 3 \, B^{2} b^{3} c^{2} d x + {\left (3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} B^{2}\right )} \log \left (b x + a\right )^{2} + {\left (B^{2} b^{3} d^{3} x^{3} + 3 \, B^{2} b^{3} c d^{2} x^{2} + 3 \, B^{2} b^{3} c^{2} d x + B^{2} b^{3} c^{3}\right )} \log \left (d x + c\right )^{2} + {\left (2 \, B^{2} b^{3} d^{3} x^{3} + {\left (5 \, b^{3} c d^{2} + a b^{2} d^{3}\right )} B^{2} x^{2} + 2 \, {\left (b^{3} c^{2} d + 3 \, a b^{2} c d^{2} - a^{2} b d^{3}\right )} B^{2} x + {\left (2 \, a b^{2} c^{2} d + a^{2} b c d^{2} - a^{3} d^{3}\right )} B^{2}\right )} \log \left (b x + a\right ) - {\left (2 \, B^{2} b^{3} d^{3} x^{3} + {\left (5 \, b^{3} c d^{2} + a b^{2} d^{3}\right )} B^{2} x^{2} + 2 \, {\left (b^{3} c^{2} d + 3 \, a b^{2} c d^{2} - a^{2} b d^{3}\right )} B^{2} x + 2 \, {\left (B^{2} b^{3} d^{3} x^{3} + 3 \, B^{2} b^{3} c d^{2} x^{2} + 3 \, B^{2} b^{3} c^{2} d x + {\left (3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} B^{2}\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )}{3 \, b^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (c\,i+d\,i\,x\right )}^2\,{\left (A+B\,\ln \left (\frac {e\,\left (a+b\,x\right )}{c+d\,x}\right )\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________